import requests
import json
from util.headers import get_header
from lxml import etree
import re
import asyncio, aiohttp


async def fetch(session, url):
    async with session.get(url) as f:
        return await f.json()


async def main():
    async with aiohttp.ClientSession() as session:
        urls = [f"https://api.web.360kan.com/v1/rank?cat={i}" for i in range(1, 7)]
        res = await asyncio.gather(*[fetch(session, url) for url in urls])
        for ress in res:
            print(ress)


asyncio.run(main())
